package club.banyuan;

public class Employee {
    private int id;
    private String name;
    private String sex;
    private String phone;
    private String email;
    private String address;
    private String education;
    private String birthday;
    private int departmentId;
    private String departmentName;
    private int positionId;
    private String positionName;


    //Getter and Setter


    public String getDepartmentName() {
        return HttpServer.getDeptService().getDept(departmentId).getName();
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getPositionName() {
        return HttpServer.getPositionService().getPosition(positionId).getName();
    }

    public void setPositionName(String positionName) {
        this.positionName = positionName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public int getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(int departmentId) {
        this.departmentId = departmentId;
    }


    public int getPositionId() {
        return positionId;
    }

    public void setPositionId(int positionId) {
        this.positionId = positionId;
    }

    public String getPositionName(int id) {
        return HttpServer.getPositionService().getPosition(id).getName();
    }

    public String getDepartmentName(int id) {
        return HttpServer.getDeptService().getDept(id).getName();
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
